import vue from '@vitejs/plugin-vue'
import VueSetupExtend from 'vite-plugin-vue-setup-extend'
import createAutoImport from './auto-import'
import createUseComponents from './auto-use-components'
import createUseIcons from './auto-use-icon'
import createVisualizerConfig from './rollup-visualizer'
import createUnocss from './unocss'

// 默认的一些设置
export default function createVitePlugins(isBuild: boolean) {
    const vitePlugins = [
        vue(),
        VueSetupExtend(),
        createAutoImport(),
        createUseComponents(),
        createUseIcons(),
        createVisualizerConfig(isBuild),
        createUnocss(),
    ]
    return vitePlugins
}
